{extend name="template/base_default"}
{block name="header"}
<link rel="stylesheet" href="__CSS__/common.css">
<link rel="stylesheet" href="__CSS__/weui.min.css">
<link rel="stylesheet" href="__CSS__/index.css">
<link rel="stylesheet" href="__CSS__/weuix.min.css"/>
<script src="__JS__/zepto.min.js"></script>
<script src="__JS__/lrz.min.js"></script>
<style>

    .form-head{
        color: white;
        font-size: 16px;

        border-radius: 5px;
        overflow: hidden;
    }
    body{
        background-image:url("__IMG__/bj.png");
        background-repeat:no-repeat;
        background-size:cover;
        text-align: center;
    }
    .body-input{
        outline: none;
        color: #dddddd;
        position: relative;
        border: solid 1px #ffffff;
        background-color: rgba(255, 255, 255, 0);
        float: left;
        margin: auto;
        font-size: 16px;
        height: 41px;
        line-height: 41px;
        border-radius: 5px;
        width: 60%;
        font-family: "Microsoft YaHei UI";
    }
    .bottom-btn{
        width:50%;
        height:100%;
        float: left;
    }
    button{
        border: none;
        color:white;
    }
    .botton1{
        background-color: #FF0000;
    }
    .botton2{
        background-color: #131a34;
    }
    .input-window{
        margin-left: auto;
        margin-right: auto;
        background-color: white;
        height:110px;
        width:110px;
        border-radius: 10px;
        margin-top: 30px;
    }
    .aa{
        height:3px;
        background-color: white;
        width:40px;
        position:absolute;
        top: 30px;
        left:55px;
    }
    .bb{
        width: 100%;
        height: 100%;
        opacity: 0;
        -webkit-tap-highlight-color: rgba(0,0,0,0);
    }
    .nav_bar{
        height:62px;
        background-color: #121832;
        width:100%;
        color:white;
        position:fixed;
        bottom: 0;
    }
    .nav_bar ul{
        width:32%;
        float: left;
        text-align: center;
        color:blue;
        margin-top: 10px;
        color:white;
    }
    .nav_bar ul li img{
        width:16px;
        height:16px;
        color:white;
    }
    li{
        list-style: none;
    }
    .erweima{
        width:200px;
        height:200px;
        margin-bottom: 20px;
    }
    .head{
        float:left;
        width:30px;
        height:30px;
    }
    .name{
        float:left;
        margin-left: 10px;
    }
    .big{
        margin-top:20px;
        margin-left: 20px;
    }
    .tuijian{
        margin-top: 16px;
        text-align: left;
        margin-left: 20px;
    }
    .form-head ul{
        float: left;
        height:90%;
        width:46%;
        margin-top: 8px;
        margin-left: 8px;
    }
    .form-head ul img{
        width:80px;
        height:80px;
    }
    .box9{

        width:32.6%;
        background-color: white;
        border: solid 1px #545454;
        height:120px;
        float: left;
        text-align:center ;
    }
    .box9 ul{
        margin-top: 10px;
    }
    .into{
        width:50%;
        margin-top: 40px;
    }
</style>
{/block}
{block name="body"}


    <div class="form-head" style="height:420px;margin-top:10px;width:90%;margin-left: auto;margin-right: auto">
       <div class="big">
            <img class="head" src="">
            <div class="name">昵称昵称</div>

       </div><br>
        <p class="tuijian">的推荐码66666</p><br>
        <p><div id="qrcode"></div> </p>
        <p>http:www.baidu.com</p>
    </div>

<div class="form-head" style="height:120px;margin-top:10px;width:90%;margin-left: auto;margin-right: auto">
    <ul >
        <li><img src="__IMG__/ewms.png"></li>
        <li>我的二维码</li>
    </ul>
    <ul id="ewm">
        <li><img src="__IMG__/erwsss.png"></li>
        <li>扫描二维码</li>
    </ul>
</div>
<div style="height: 100px;width:100%;"></div>

<div class="nav_bar">
    <a href="{:url('index/index')}"><ul>
        <li><img src="__IMG__/add_sj.png"> </li>
        <li>首页 </li>
    </ul></a>
    <ul>
        <li><img src="__IMG__/add_sj.png"> </li>
        <li>支付 </li>
    </ul>
    <a href="{:url('user/index')}"><ul>
        <li><img src="__IMG__/add_sj.png"> </li>
        <li>我的222 </li>111
    </ul></a>
</div>

{/block}
{block name="footer"}
<script type="text/javascript" src="http://res.wx.qq.com/open/js/jweixin-1.2.0.js"></script>
<script type="text/javascript" src="__CDN__/jquery-qrcode/v1.0/jquery.qrcode.min.js"></script>
<script type="text/javascript" src="__JS__/public.js"></script>
<script>

    wx.config({
        debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来，若要查看传入的参数，可以在pc端打开，参数信息会通过log打出，仅在pc端时才会打印。
        appId: "{$SignPackage['appId']}", // 必填，公众号的唯一标识
        timestamp:"{$SignPackage['timestamp']}" , // 必填，生成签名的时间戳
        nonceStr: "{$SignPackage['nonceStr']}", // 必填，生成签名的随机串
        signature: "{$SignPackage['signature']}",// 必填，签名，见附录1
        jsApiList: ['scanQRCode','closeWindow','onMenuShareTimeline','scanQRCode','onMenuShareAppMessage','onMenuShareQQ','getLocation','openLocation'] // 必填，需要使用的JS接口列表，所有JS接口列表见附录2
    });
    $('#ewm').click(function () {
        wx.scanQRCode({
            needResult: 0,
            scanType: ["qrCode","barCode"],
            success: function (res) {
                var result = res.resultStr;
            }
        });


    })

    function refreshQrcode() {
        $text = $(".j_qrcode_text").val();
        $("#qrcode").empty();
        $("#qrcode").qrcode(toUtf8($text));
    }
    function toUtf8(str) {
        var out, i, len, c;
        out = "";
        len = str.length;
        for(i = 0; i < len; i++) {
            c = str.charCodeAt(i);
            if ((c >= 0x0001) && (c <= 0x007F)) {
                out += str.charAt(i);
            } else if (c > 0x07FF) {
                out += String.fromCharCode(0xE0 | ((c >> 12) & 0x0F));
                out += String.fromCharCode(0x80 | ((c >>  6) & 0x3F));
                out += String.fromCharCode(0x80 | ((c >>  0) & 0x3F));
            } else {
                out += String.fromCharCode(0xC0 | ((c >>  6) & 0x1F));
                out += String.fromCharCode(0x80 | ((c >>  0) & 0x3F));
            }
        }
        return out;
    }
    $(function () {
        $("#qrcode").qrcode("{$url}");
    })
</script>
{/block}